package com.design.chatroom;

public class User {

    private String name;


    private ChatRoom chatRoom;


    public User(String name, ChatRoom room) {
        this.name = name;
        this.chatRoom = room;
    }

    public String getName() {
        return name;
    }

    public void sendMessage(String msg) {
        this.chatRoom.showMsg(this,msg);
    }
}
